/**
 * Created by yangfan on 2016/10/12.
 */
define(['config/appregister',"../../services/httpServices","i18n"],function(app,httpService,i18n){
    app.directive("pagesSet",function(){
        return {
            template:'<a ng-repeat="item in everPageShow track by $index " ng-bind="item" ng-class="{true:'+'addRightBorder'+',false:'+'notAddRightBorder'+'}[isAddRightBorder]"></a>',
            scope:true,
            link:function(scope,element,attrs){
                scope.isAddRightBorder = true;
                if($index =="last"){
                    scope.isAddRightBorder = false;
                }
            }
        }
    }).directive("getItem",function(){
            return {
                scope:{item:"=getData"},
             link:function(scope,element,attrs){
                 var a = scope.item;
             }
            }
        }).directive("getDynamic",function($state){
            return {
            templateUrl:'app/business/personMine/template/myMainPageDynamic.html',
            scope:{
                conf:"=confData",
                pic:"=personData"
            },
            link:function(scope,element,attrs){
				scope.goDetail = function(item){
					if(item.pdType == 1 || 3){
						//跳转工程资料详情
						$state.go('eng.techdetail',{'fileId':item.fkId})
					}
					if(item.pdType == 2 || 4){
						//跳转论文图书馆详情
						$state.go('eng.libraryDetail',{'thesisId':item.fkId})
					}
					if(item.pdType == 6 || 7){
						//跳转白问百答详情
						$state.go('eng.postbardeta',{'postbarId':item.fkId})
					}
				}
            }
        }
    })


});
